<?php #//AJAX PHP PENNY AUCTION v.1.1

#///////////////////////////////////////////////////////////
#//  COPYRIGHT 2009 Aaron Helmlinger ALL RIGHTS RESERVED  //
#///////////////////////////////////////////////////////////
                        include "../includes/config.inc.php";
             
             
                include "loggedin.inc.php";
                               
          if($_POST[update])  {

       
       $activated = $_POST[activated];
             $autobidder_instant_death = $_POST[autobidder_instant_death];
              $autobidder_activation_seconds = $_POST[autobidder_activation_seconds];                   
    
$query2="UPDATE PHPAUCTIONXL_proxybid_settings SET activated='$activated' WHERE id='1'";
       
mysql_query($query2);
         
       
       $query2="UPDATE PHPAUCTIONXL_version_1_4 SET autobidder_instant_death='$autobidder_instant_death' WHERE id='1'";
       
mysql_query($query2);

$query2="UPDATE PHPAUCTIONXL_version_1_4 SET autobidder_activation_seconds='$autobidder_activation_seconds' WHERE id='1'";
       
mysql_query($query2);
       
         }     
       
         $query_settings = "select * from PHPAUCTIONXL_proxybid_settings where id='1'";
                             $query_settings2 =  mysql_query ($query_settings);
                                $activated = mysql_result($query_settings2,0,"activated");
                                                   
                                
          $query_settings = "select * from PHPAUCTIONXL_version_1_4 where id='1'";
                             $query_settings2 =  mysql_query ($query_settings);
                                $autobidder_instant_death = mysql_result($query_settings2,0,"autobidder_instant_death");                      
                                 $autobidder_activation_seconds = mysql_result($query_settings2,0,"autobidder_activation_seconds"); 

  ?>
  
  
  
  


<HTML>
<HEAD>
<link rel='stylesheet' type='text/css' href='style.css' />
<link href="css/main.css" rel="stylesheet" type="text/css">
</HEAD>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">





<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td>
    
       <? // -------------------------- Admin Tool Heading --------------------------------------?>
       
       
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="titulo">
        <tr> 
         <td class="icono"><img src="images/auction_icon2.gif" width="31" height="25" ></td>
          <td class="breadcrumbs"><p><span><?=$MSG_239?></span>&nbsp;&gt;&gt;&nbsp;<?=$MSG_AJAX_ADMIN_AUCTION_AUTOBIDDER_SIDEBAR?></p></td>
        </tr>
      </table>
      
      
      
      </td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
  </tr>
    <tr> 
    <td align="center" valign="middle">
    
    
    
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFFFFF">
<TR>
<TD align="center">
<BR>
<FORM NAME=conf ACTION=<?=basename($_SERVER['PHP_SELF'])?> METHOD=POST>


  <? // -------------------------- LIGHT BLUE TITLE BAR --------------------------------------?>

	<TABLE WIDTH="95%" BORDER="0" CELLSPACING="0" CELLPADDING="0"  class="base" ALIGN="CENTER" style="border:1px solid #ccc;">
		<TR>
			<TD ALIGN=CENTER class=title>
				<p><? print $MSG_AJAX_ADMIN_AUCTION_AUTOBIDDER_SIDEBAR; ?></p>
			</TD>
		</TR>
		
		
		
		<TR>
		<TD>
		
    
    
    <TABLE WIDTH=100% ALIGN="CENTER" CELLPADDING=0 cellspacing="0" BGCOLOR="#FFFFFF">
		
 <? // -------------------------- ERROR BAR --------------------------------------?>    
 
 <? if ($ERR) { ?>   
    	<TR>
				<TD COLSPAN="2"  class="error"><B>
					<p><? print $ERR; ?></p>
					</B></TD>
			</TR>
	<? } ?>	
    
    	
			
			
 <? // -------------------------- WHITE BAR --------------------------------------?> 			
				
        <TR>
        <TD WIDTH="125"> 
					<p class="blue"><? print $MSG_AJAX_ADMIN_AUTOBIDDER_ON_OFF; ?></p>
					</TD>
					
					
				<TD WIDTH="405">
				
					
					 
<input type="radio" name="activated" value="1" <? if ( $activated == 1 ) echo checked ?> /> <?=$MSG_AJAX_ADMIN_SELL_ON;?> &nbsp;&nbsp; <input type="radio" name="activated" value="0" <? if ( $activated == 0 ) echo checked ?> /> <?=$MSG_AJAX_ADMIN_SELL_OFF;?>  &nbsp;&nbsp;&nbsp;&nbsp;


			<? print 	$MSG_AJAX_ADMIN_AUTOBIDDER_ON_OFF_NOTE; ?>		
					
				 </TD>
			</TR>
			
				
	<? // -------------------------- WHITE BAR --------------------------------------?> 			
				
        <TR>
        <TD WIDTH="125" class="gris"> 
					<p class="blue"><? print $MSG_AJAX_ADMIN_AUTOBIDDER_INSTANT_DEATH_ON_OFF; ?></p>
					</TD>
					
					
				<TD WIDTH="405"  class="gris">
				
					
					 
<input type="radio" name="autobidder_instant_death" value="1" <? if ( $autobidder_instant_death == 1 ) echo checked ?> /> <?=$MSG_AJAX_ADMIN_SELL_ON;?> &nbsp;&nbsp; <input type="radio" name="autobidder_instant_death" value="0" <? if ( $autobidder_instant_death == 0 ) echo checked ?> /> <?=$MSG_AJAX_ADMIN_SELL_OFF;?>  &nbsp;&nbsp;&nbsp;&nbsp;


			<? print 	$MSG_AJAX_ADMIN_AUTOBIDDER_INSTANT_DEATH_ON_OFF_NOTE; ?>		
					
				 </TD>
			</TR>	
		 
		 
		 
<? // -------------------------- WHITE BAR --------------------------------------?> 			
				 <TR>
        <TD WIDTH="125"> 
					<p class="blue"><? print $MSG_AJAX_ADMIN_AUTOBIDDER_SECONDS_REMAINING; ?></p>
					</TD>
					
					
				<TD WIDTH="405">
					
					<?
					
					if ( $autobidder_activation_seconds == 999999999999 ) { $autobidder_activation_seconds1 = $AUTOBIDDER_TIME_REMAINING1; }
					 if ( $autobidder_activation_seconds == 36 ) { $autobidder_activation_seconds1 = $AUTOBIDDER_TIME_REMAINING2; }
					if ( $autobidder_activation_seconds == 66 ) { $autobidder_activation_seconds1 = $AUTOBIDDER_TIME_REMAINING3; }
					if ( $autobidder_activation_seconds == 126 ) { $autobidder_activation_seconds1 = $AUTOBIDDER_TIME_REMAINING4; }
					if ( $autobidder_activation_seconds == 186 ) { $autobidder_activation_seconds1 = $AUTOBIDDER_TIME_REMAINING5; }
					if ( $autobidder_activation_seconds == 246 ) { $autobidder_activation_seconds1 = $AUTOBIDDER_TIME_REMAINING6; }
					if ( $autobidder_activation_seconds == 306 ) { $autobidder_activation_seconds1 = $AUTOBIDDER_TIME_REMAINING7; }
					if ( $autobidder_activation_seconds == 606 ) { $autobidder_activation_seconds1 = $AUTOBIDDER_TIME_REMAINING8; }
					if ( $autobidder_activation_seconds == 3606 ) { $autobidder_activation_seconds1 = $AUTOBIDDER_TIME_REMAINING9; }
          
          ?>
					
					
					
						      <SELECT NAME="autobidder_activation_seconds" >
<OPTION VALUE="<? print $autobidder_activation_seconds; ?>" ><? print $autobidder_activation_seconds1; ?> 
<OPTION VALUE=999999999999 >At Any Time Before Auction Ends
<OPTION VALUE=36 >30 Seconds Remaining 
<OPTION VALUE=66 >1 Minute Remaining
<OPTION VALUE=126 >2 Minute Remaining
<OPTION VALUE=186 >3 Minute Remaining
<OPTION VALUE=246 >4 Minute Remaining
<OPTION VALUE=306 >5 Minute Remaining
<OPTION VALUE=606 >10 Minute Remaining
<OPTION VALUE=3606 >1 Hour Remaining

</SELECT>  <BR><BR>
           <? print $MSG_AJAX_ADMIN_AUTOBIDDER_SECONDS_REMAINING_NOTE; ?>


					
				</TD>
			</TR>			
		

		</TABLE>
		
		  <INPUT TYPE=hidden NAME=update VALUE=1 >
		        <INPUT TYPE="submit" NAME="act" VALUE="<? print $MSG_AJAX_ADMIN_UPDATE_SETTINGS; ?>" class="action">
		 </form>
		
		</TD>
		</TR>
	</TABLE>
	</FORM>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
